import { Router } from 'hyper-express';
import requireUser from '../../../middlewares/auth/requireUser';
import cache from '../../../middlewares/cache';
import rowLevelPermission from '../../../middlewares/auth/rowLevelPermission';
//#region AutoCreateCode
import { uctooMinishopOrderStatusController } from '../../../controllers';
const uctoominishopOrderStatusRouter = new Router();
const minishopOrderStatusController = new uctooMinishopOrderStatusController();

uctoominishopOrderStatusRouter.post('/add', requireUser, minishopOrderStatusController.add);
uctoominishopOrderStatusRouter.post('/edit', requireUser, rowLevelPermission('uctoo/minishop_order_status'), minishopOrderStatusController.edit);
uctoominishopOrderStatusRouter.post('/del', requireUser, rowLevelPermission('uctoo/minishop_order_status'), minishopOrderStatusController.delete);

//For getting minishopOrderStatus with permission control
uctoominishopOrderStatusRouter.get('/:id', requireUser,  rowLevelPermission('uctoo/minishop_order_status'), minishopOrderStatusController.getSingle);
uctoominishopOrderStatusRouter.get('/:limit/:page', requireUser,  rowLevelPermission('uctoo/minishop_order_status'), minishopOrderStatusController.getMany);
uctoominishopOrderStatusRouter.get('/:limit/:page/:skip', requireUser,  rowLevelPermission('uctoo/minishop_order_status'), minishopOrderStatusController.getMany);

//#endregion AutoCreateCode
export default uctoominishopOrderStatusRouter;
